Integrand size = 27, antiderivative size = 52 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {b \text {arctanh}(\cos (c+d x))}{2 d}-\frac {a \cot ^3(c+d x)}{3 d}-\frac {b \cot (c+d x) \csc (c+d x)}{2 d} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2917, 2687, 30, 2691, 3855} \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \cot ^3(c+d x)}{3 d}+\frac {b \text {arctanh}(\cos (c+d x))}{2 d}-\frac {b \cot (c+d x) \csc (c+d x)}{2 d} \]
[In]
[Out]
Rule 30
Rule 2687
Rule 2691
Rule 2917
Rule 3855
Rubi steps \begin{align*} \text {integral}& = a \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx+b \int \cot ^2(c+d x) \csc (c+d x) \, dx \\ & = -\frac {b \cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} b \int \csc (c+d x) \, dx+\frac {a \text {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{d} \\ & = \frac {b \text {arctanh}(\cos (c+d x))}{2 d}-\frac {a \cot ^3(c+d x)}{3 d}-\frac {b \cot (c+d x) \csc (c+d x)}{2 d} \\ \end{align*}
Time = 0.09 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.83 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \cot ^3(c+d x)}{3 d}-\frac {b \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {b \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \]
[In]
[Out]
Time = 0.30 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.38
method | result | size |
derivativedivides | \(\frac {-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )^{3}}+b \left (-\frac {\cos ^{3}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(72\) |
default | \(\frac {-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )^{3}}+b \left (-\frac {\cos ^{3}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(72\) |
risch | \(\frac {6 i a \,{\mathrm e}^{4 i \left (d x +c \right )}+3 b \,{\mathrm e}^{5 i \left (d x +c \right )}+2 i a -3 b \,{\mathrm e}^{i \left (d x +c \right )}}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}\) | \(98\) |
parallelrisch | \(\frac {-a \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 b \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +3 a \cot \left (\frac {d x}{2}+\frac {c}{2}\right )-12 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b -3 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{24 d}\) | \(99\) |
norman | \(\frac {-\frac {a}{24 d}+\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(152\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (46) = 92\).
Time = 0.29 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.29 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {4 \, a \cos \left (d x + c\right )^{3} + 6 \, b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, {\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, {\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]
[In]
[Out]
\[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )} \csc ^{4}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.17 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3 \, b {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + \log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {4 \, a}{\tan \left (d x + c\right )^{3}}}{12 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (46) = 92\).
Time = 0.34 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.21 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {22 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \]
[In]
[Out]
Time = 9.90 (sec) , antiderivative size = 111, normalized size of antiderivative = 2.13 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{3}\right )}{8\,d} \]
[In]
[Out]